package com.biz.primus.ms.member.trans;

import com.biz.primus.model.member.vo.response.MemberLoginResponseVo;
import com.biz.primus.ms.member.dao.po.Member;
import com.google.common.base.Function;

import javax.annotation.Nullable;

/**
 * Created by liangbin on 2017/11/29.
 */
public class MemberToLoginResp implements Function<Member,MemberLoginResponseVo>{
    @Nullable
    @Override
    public MemberLoginResponseVo apply(@Nullable Member input) {
        MemberLoginResponseVo resp = new MemberLoginResponseVo();
        resp.setMemberId(input.getId());
        resp.setAccount(input.getAccount());
        resp.setAccountStateType(input.getMemberStateType());
        resp.setBirthday(input.getBirthday());
        resp.setEmail(input.getEmail());
        resp.setLoginCount(input.getLoginCount());
        resp.setMobile(input.getMobile());
        resp.setNickName(input.getNickName());
        resp.setPortraitUrl(input.getPortraitUrl());
        resp.setSexType(input.getSexType());
        return resp;
    }
}
